package com.mdx.mapper;

import com.mdx.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;

public interface UserMapper extends Mapper<User> {
    @Select("select name from role where id= #{roleId}")
    Set<String> getRolesByUserName(@Param("roleId") Integer roleId);

    Set<String> getPermissionsByRoleNames(Map<String, Object> map);

    @Select("select * from filter_chain order by ordered asc ")
    LinkedHashMap<String, String> getFilterChainMap();
}
